﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using crm_library.Controls;
using crm_dal.Objects;
using crm_library.Extenstions;

namespace crm_web.DataPages
{
    public partial class SaleItem : System.Web.UI.Page
    {
        private ListingTableBuilder<crm_dal.Objects.SaleItem> Builder;

        protected void Page_Load(object sender, EventArgs e)
        {
            Builder = new ListingTableBuilder<crm_dal.Objects.SaleItem>(true, true, true, true, crm_dal.Objects.SaleItem.GetAll());

            Grid.Controls.AddRange(Builder.GenerateFilters().ToArray());
            Grid.Controls.Add(new Literal { Text = "<br />" });
            Grid.Controls.Add(new Literal { Text = "<br />" });
            Grid.Controls.Add(Builder);
        }
    }
}